Skip to content

Instantly share code, notes, and snippets.

@jsjohnst
Created August 30, 2010 03:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsjohnst/556979 to your computer and use it in GitHub Desktop.
Save jsjohnst/556979 to your computer and use it in GitHub Desktop.
window.addEventListener && window.addEventListener('keydown', function(e) {
this.keys ? this.keys.push(e.keyCode) : this.keys = [e.keyCode];
if(this.keys.toString().indexOf("38,38,40,40,37,39,37,39,66,65") >= 0) {
var audio = document.createElement("audio");
audio.src = "http://geek.thinkunique.org/wp-content/vid/tmnt.mp3";
audio.play();
}
}, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment